<?php
session_start();
isLogin();

if($_REQUEST['m_id']){
	$sql="delete from ".$prefix."member where m_id=".$_REQUEST['m_id'];
	if(mysql_query($sql)){
		reload_js("","index.php?cmd=viewAdmin");
	}else{
		reload_js("删除失败，原因：程序错误，请联系技术人员进行修改","index.php");
	}
}
?>
<script language="javascript" src="../templates/<?php echo $moban;?>/js/common.js"></script>
<script language="javascript">
changeWebTitle('管理员组查看');
</script>

<div class="ContentRight">
    <div class="ContentRightTop">
      <div class="BarLeft"></div>
      <div class="ContentRightTopText">管理员组查看</div>
      <div class="BarRight"></div>
      <div class="Cal"></div>
    </div>
    <div class="ContentRightBox">
      <table width="100%" cellpadding="0" class="Table1" bordercolor="#4ab902" border="1" cellspacing="0">
        <tr>
          <td width="13%" height="25" align="center">ID</td>
          <td width="46%" align="center">账号</td>
          <td width="19%" align="center">级别</td>
		  <?php if($_SESSION['super']){?>
          <td width="22%" align="center">操作</td>
		  <?php }?>
        </tr>
		<?php 
		$result=mysql_query("select * from ".$prefix."member");
		while($arr=mysql_fetch_array($result)){
		?>
        <tr>
          <td height="25" align="center"><?php echo $arr['m_id'];?></td>
          <td align="center"><?php echo $arr['m_username'];?></td>
          <td align="center"><?php if($arr['m_isSuperAdmin']){echo "超管";}else{echo "普管";}?></td>
		  <?php if($_SESSION['super']){?>
          <td align="center"><a href="<?php echo "?cmd=addAdmin&m_id=".$arr['m_id']?>">修改</a>&nbsp;<a href="<?php echo "?cmd=".$_REQUEST['cmd']."&m_id=".$arr['m_id']."&act=del"?>" onclick="return confirm('您确认删除该条记录？删除后将不可恢复！');">删除</a></td>
		  <?php }?>
        </tr>
		<?php
		}
		?>
        <tr>
          <td height="25" align="right">版权所有：</td>
          <td colspan="<?php if($_SESSION['super']){echo "3";}else{echo "2";}?>"><a href="http://www.fengsh8.com" target="_blank">风尚淘客程序</a></td>
        </tr>
      </table>
	  
	  
    </div>
    <div class="Cal"></div>
  </div>